package com.sm.tool.entity.dto;

import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;

@Data
@Builder
public class UserDTO {

    /**
     * CREATE TABLE `user` (
     *   `userId` bigint(21) NOT NULL AUTO_INCREMENT COMMENT '用户表id',
     *   `userName` varchar(14) DEFAULT NULL COMMENT '用户名',
     *   `passWord` varchar(14) DEFAULT NULL COMMENT '密码',
     *   `userSecret` varchar(64) DEFAULT NULL COMMENT '用户密钥（系统自动生，成用于jwt）',
     *   `nickName` varchar(8) DEFAULT NULL COMMENT '昵称',
     *   `balance` double(64,2) DEFAULT NULL COMMENT '余额',
     *   `updateTime` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
     *   `createTime` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
     *   PRIMARY KEY (`userId`)
     * ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
     */
    private Long userId;
    private String userName;
    private String passWord;
    private String userSecret;
    private String nickName;
    private BigDecimal balance;
    private Date updateTime;
    private Date createTime;
    /**
     * 用户对应的角色集合
     */
    private Set<RoleDTO> roles;

}
